<%@page contentType="text/html;charset=utf-8"%>
<%@include file="../common/taglib.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>当当图书 – 全球最大的中文网上书店</title>
		<%@include file="../common/css.jsp"%>
		<script type="text/javascript" src="<%=request.getContextPath()%>/js/prototype-1.6.0.3.js">
		</script>
	
	</head>
	<body>
		<%@include file="../common/head1.jsp"%>
		<br />
		<br />
		<br />

		<div class="my_shopping">
			<img class="pic_shop"
				src="<%=request.getContextPath()%>/images/pic_myshopping.gif" />

		</div>
		<div id="div_choice" class="choice_merch">
			<h2 id="cart_tips">
				您已选购以下商品
			</h2>
			<div class="choice_bord">
				<table class="tabl_buy" id="tbCartItemsNormal">
					<tr class="tabl_buy_title">
						<td class="buy_td_6">
							<span>&nbsp;</span>
						</td>
						<td>
							<span class="span_w1">商品名</span>
						</td>
						<td class="buy_td_5">
							<span class="span_w2">市场价</span>
						</td>
						<td class="buy_td_4">
							<span class="span_w3">当当价</span>
						</td>
						<td class="buy_td_1">
							<span class="span_w2">数量</span>
						</td>
						<td class="buy_td_2">
							<span>变更数量</span>
						</td>
						<td class="buy_td_1">
							<span>删除</span>
						</td>

					</tr>
					<tr class='objhide'>
						<td colspan="8">
							&nbsp;
						</td>
					</tr>

					<c:forEach items="${session_cart.effectiveCartItems}" var="cartItem">
						<tr class='td_no_bord'>
							<td style='display: none'>
								9317290
							</td>
							<td class="buy_td_6">
								<span class="objhide"><img src='<%=request.getContextPath()%>/images/buttom_goumai.gif'/> </span>
							</td>
							<td>
								<a href="#">${cartItem.product.name}</a>
							</td>
							<td class="buy_td_5">
								<span class="c_gray">￥${cartItem.product.fixedPrice}</span>
							</td>
							<td class="buy_td_4">
								&nbsp;&nbsp;
								<span>￥${cartItem.product.dangPrice}</span>
							</td>
							<td class="buy_td_1">
								&nbsp;&nbsp;${cartItem.number}
							</td>
							<td class="buy_td_1">

								<input class="del_num" type="text" size="3" maxlength="4"
									id="it_${cartItem.product.id}" value='${cartItem.number}' />

							<c:set var="num_id" value="it_${cartItem.product.id}" />	
							<a href="javascript:;"
									onclick="location='updateCart.do?productId=${cartItem.product.id}&num='+$('${num_id}').value">变更</a>
							</td>
							<td class="buy_td_1">
								<a href="javascript:;"
									onclick="location='dropCart.do?productId=${cartItem.product.id}'">删除</a>
							</td>
						</tr>
					</c:forEach>
					
				</table>
				<div id="div_no_choice" class="objhide">
					<div class="choice_title"></div>
					<div class="no_select">
						您还没有挑选商品
					</div>
				</div>
				<div class="choice_balance">
					<div class="select_merch">
						<a href="bookList.do?twoCatId=${bForm.twoCatId}&threeCatId=${bForm.threeCatId}">继续挑选商品&gt;&gt;</a>
					</div>
					<div class="total_balance">
						<div class="save_total">
							您共节省：
							<span class="c_red"> ￥<span id="total_economy">${session_cart.totalPrice-session_cart.dangPrice}</span>
							</span>
							<span id='total_vip_economy' class='objhide'> ( 其中享有优惠： <span
								class="c_red"> ￥<span id='span_vip_economy'>0.00</span> </span>
								) </span>
							<span style="font-size: 14px">|</span>
							<span class="t_add">商品金额总计：</span>
							<span class="c_red_b"> ￥<span id='total_account'>${session_cart.dangPrice}</span>
							</span>
						</div>
						<div id="balance" class="balance">
							<a name='checkout' href="javascript:void(0);" 
							onclick="location='addressForm.do'"><img
									src="${pageContext.request.contextPath}/images/butt_balance.gif"
									alt="结算" border="0" title="结算" /> </a>
						</div>
					</div>
				</div>
			</div>
		</div>


		<!-- 用户删除恢复区 -->
		<c:if test="${fn:length(session_cart.dropCartItems) gt 0 }">
			<div id="divCartItemsRemoved" class="del_merch">
				<div class="del_title">
					您已删除以下商品，如果想重新购买，请点击“恢复”
				</div>
				<table class=tabl_del id=del_table>
					<tbody>

						<c:forEach items="${session_cart.dropCartItems}" var="cartItem"
							varStatus="status">
							<tr>
								<td width="58" class=buy_td_6>
									&nbsp;
								</td>
								<td width="365" class=t2>
									<a href="#">${cartItem.product.name}</a>
								</td>
								<td width="106" class=buy_td_5>
									￥${cartItem.product.fixedPrice}
								</td>
								<td width="134" class=buy_td_4>
									<span>￥${cartItem.product.dangPrice}</span>
								</td>
								<td width="56" class=buy_td_1>
									<a href="javascript:;"
										onclick="location='recoveryCart.do?productId=${cartItem.product.id}'">
										恢复 </a>
								</td>
								<td width="16" class=objhide>
									&nbsp;
								</td>
							</tr>
							<c:if test="${!status.last}">
								<tr class=td_add_bord>
									<td colspan=8>&nbsp;</td></tr>
							</c:if>
						</c:forEach>
					</tbody>
				</table>
			</div>
		</c:if>
		<br />
		<br />
		<br />
		<br />
		<!--页尾开始 -->
		<%@include file="../common/foot.jsp"%>
		<!--页尾结束 -->
	</body>
</html>



